home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbasicpg.zip / HIROLLER.BAS < prev    next >
BASIC Source File  |  1989-08-31  |  441b  |  24 lines

  1. ' HIROLLER.BAS
  2. ' This program rolls one simulated die 10 times and displays the
  3. '   message "Nice Roll!" if the die shows 6.
  4.  
  5. CLS
  6.  
  7. INPUT "Press Enter to roll the die 10 times.  Think six...", dummy$
  8. PRINT
  9.  
  10. RANDOMIZE TIMER
  11.  
  12. FOR i% = 1 TO 10
  13.     roll% = INT(RND * 7)
  14.     PRINT "Roll: "; roll%,
  15.     IF (roll% = 6) THEN
  16.         COLOR 2
  17.         PRINT "Nice Roll!"
  18.         COLOR 7
  19.     ELSE
  20.         PRINT
  21.     END IF
  22. NEXT i%
  23.  
  24.